home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hottest 6
/
Hottest 6 (1996)(PDSoft)[!].iso
/
software
/
videoutils
/
h-m
/
mainactor
/
rexx
/
adpro.ma
next >
Wrap
Text File
|
1978-11-24
|
3KB
|
125 lines
/*
*
* AdPro V 1.0, 1993 Markus Moenig
*
* Uses the current operator of AdPro on the actual source project,
* AdPro has to be active and setup to your wanted operation.
*
* The new project gets the name of the source project + ".new"
* and is also converted to the saver module type of the source project.
*
* The loader/saver of the source project can be either picture
* or animation modules.
*
* A new project will be opened for the resulting pictures/animation.
*/
OPTIONS RESULTS
ADDRESS MAINACTOR
ScreenToFront
PrintAndStoreTXT "AdPro script V1.0 ..."
IF ~SHOW('P','ADPro') THEN DO
PrintAndStoreTXT "Need ACTIVE AdPro ... aborting"
EXIT
END
ADDRESS MAINACTOR
GetSPName
IF rc = 0 THEN DO /* check if project loaded */
PARSE VAR RESULT firstname secondname . /* store name of the animation */
/* or the names of the picture list */
ScreenToFront
DeSelectAll
GetSPSaver
PARSE VAR RESULT savertype savername . /* store type, name of saver module */
/* Store general infos of the project */
GetSPInfo
PARSE VAR RESULT width height colors pics caching loop cpf .
IF savertype = "PIC" THEN
picformat=savername
ELSE DO
picformat=IFF
SetSPSaver PIC picformat
END
ADDRESS "ADPro"
LFormat "Universal"
PSTATUS UNLOCKED
ORIENTATION PORTRAIT
SFormat picformat
ADDRESS MAINACTOR
newname = firstname || ".new" /* new name = old one + ".new" */
SelectAll
saveargs=newname
Save saveargs /* Save Pictures */
DO i=1 to pics /* Operate all pics */
actualpic=newname || "." || Right("00000" || i, 5)
PrintTxt "ADPro operates on Picture" i
ADDRESS "ADPro"
Load actualpic
RENDER_TYPE colors
PSORT 0
Execute
Save actualpic IMAGE
ADDRESS MAINACTOR
END
IF caching = "CACHING=YES" THEN /* Was the old project cached ? */
OpenNewProject "CACHING" /* If yes new project is also cached */
ELSE
OpenNewProject /* If not new project is not cached */
SetSPLoader PIC picformat /* Set the new projects loader module */
firstpic=newname || "." || Right("00000" || 1, 5)
lastpic=newname || "." || Right("00000" || pics, 5)
LoadProject firstpic lastpic /* Load picture list */
SetSPSaver savertype savername
IF savertype = "ANIM" THEN DO /* If we wanted a new animation, */
/* we have to build it */
SelectAll
saveargs=newname || " " || cpf || " " || loop
Save saveargs
UnloadProject
DO i=1 TO pics /* delete temporary pics */
actualpic=newname || "." || Right("00000" || i, 5)
PrintTxt "Delete " || actualpic
ADDRESS COMMAND "delete " || actualpic
END
SetSPLoader savertype savername
LoadProject newname
END
PrintAndStoreTXT "READY !!!!"
END